/**
 * @desc 机型管理
 * @param
 * @author zhoujie
 * @date 2022/11/18 10:02:45
*/

import request from '@/assets/common/js/utils/request';
/*------------------------获取机型---------------------------------*/
//获取机型列表
export function getList() {
    return request({
        url: 'devcietype/get/list',
        method: 'get',
    });
}
//新增保存机型
export function createJx(data) {
    return request({
        url: 'devcietype/create',
        method: 'post',
        data: data,
    });
}
//修改机型
export function updateJx(data) {
    return request({
        url: `devcietype/update/${data.id}`,
        method: 'put',
        data: data,
    });
}
//机型删除
export function deleteJx(data) {
    return request({
        url: 'devcietype/delete',
        method: 'DELETE',
        params: data,
    });
}
//机型 详情
export function getJxInfo(data) {
    return request({
        url: 'devcietype/get',
        method: 'get',
        params: data,
    });
}
/*--------------------获取机型的型号-----------------------*/
//获取型号列表
export function createXh(data) {
    return request({
        url: 'devicemodel/create',
        method: 'post',
        data: data,
    });
}
export function updateXh(data) {
    return request({
        url: 'devicemodel/update',
        method: 'put',
        data: data,
    });
}
//获取列表详情
export function getXhInfo(data) {
    return request({
        url: 'devicemodel/get',
        method: 'get',
        params: data,
    });
}
//型号删除
export function deleteXh(data) {
    return request({
        url: 'devicemodel/delete',
        method: 'DELETE',
        params: data,
    });
}
//启用机型
export function enableXh(data) {
    return request({
        url: 'devicemodel/enable',
        method: 'post',
        data: data,
        formdataType: true,
    });
}
//禁用机型
export function disableXh(data) {
    return request({
        url: 'devicemodel/disable',
        method: 'post',
        data: data,
        formdataType: true,
    });
}
//型号列表
export function devicemodelgetlist(data) {
    return request({
        url: 'devicemodel/getlist',
        method: 'POST',
        data: data,
    });
}
